﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Prism.ViewModel;
using System.ComponentModel;

namespace ZhiHeng.OneCard.WpfClient.Model
{
    public class TranData : NotificationObject
    {
        #region 属性
        private string _name;
        /// <summary>
        ///  姓名四个汉字
        /// </summary>
        public string Name
        {
            get { return _name; }
            set
            {
                _name = value;
                this.RaisePropertyChanged("Name");
            }
        }
        private byte _sexNo;
        /// <summary>
        ///  性别
        /// </summary>
        public byte SexNo
        {
            get { return _sexNo; }
            set
            {
                _sexNo = value;
                this.RaisePropertyChanged("SexNo");
            }
        }
        private string _operator;
        /// <summary>
        ///  Operator
        /// </summary>
        public string Operator
        {
            get { return _operator; }
            set
            {
                _operator = value;
                this.RaisePropertyChanged("Operator");
            }
        }
        private string _phone;
        /// <summary>
        ///  Phone
        /// </summary>
        public string Phone
        {
            get { return _phone; }
            set
            {
                _phone = value;
                this.RaisePropertyChanged("Phone");
            }
        }

        private string _deptCode;
        /// <summary>
        ///  部门代码
        /// </summary>
        public string DeptCode
        {
            get { return _deptCode; }
            set
            {
                _deptCode = value;
                this.RaisePropertyChanged("DeptCode");
            }
        }
        private uint _cardNo;
        /// <summary>
        ///  卡号
        /// </summary>
        public uint CardNo
        {
            get { return _cardNo; }
            set
            {
                _cardNo = value;
                this.RaisePropertyChanged("CardNo");
            }
        }
        private uint _accountNo;
        /// <summary>
        ///  卡号
        /// </summary>
        public uint AccountNo
        {
            get { return _accountNo; }
            set
            {
                _accountNo = value;
                this.RaisePropertyChanged("AccountNo");
            }
        }
        private string _studentCode;
        /// <summary>
        ///  人员编号
        /// </summary>
        public string StudentCode
        {
            get { return _studentCode; }
            set
            {
                _studentCode = value;
                this.RaisePropertyChanged("StudentCode");
            }
        }
        private string _idCard;
        /// <summary>
        ///  身份证号
        /// </summary>
        public string IDCard
        {
            get { return _idCard; }
            set
            {
                _idCard = value;
                this.RaisePropertyChanged("IDCard");
            }
        }
        private string _pID;
        /// <summary>
        ///  身份代码
        /// </summary>
        public string PID
        {
            get { return _pID; }
            set
            {
                _pID = value;
                this.RaisePropertyChanged("PID");
            }
        }
        private string _iDNo;
        /// <summary>
        ///  身份序号
        /// </summary>
        public string IDNo
        {
            get { return _iDNo; }
            set
            {
                _iDNo = value;
                this.RaisePropertyChanged("IDNo");
            }
        }
        private int _balance;
        /// <summary>
        ///  余额
        /// </summary>
        public int Balance
        {
            get { return _balance; }
            set
            {
                _balance = value;
                this.RaisePropertyChanged("Balance");
            }
        }

        /// <summary>
        ///  Balance
        /// </summary>
        public decimal Balance1
        {
            get { return _balance * 0.01m; }
            set
            {
                this.RaisePropertyChanged("Balance1");
            }
        }

        private string _password;
        /// <summary>
        ///  消费密码
        /// </summary>
        public string Password
        {
            get { return _password; }
            set
            {
                _password = value;
                this.RaisePropertyChanged("Password");
            }
        }
        private DateTime _expireDate;
        /// <summary>
        ///  账户截止日期
        /// </summary>
        public DateTime ExpireDate
        {
            get { return _expireDate; }
            set
            {
                _expireDate = value;
                this.RaisePropertyChanged("ExpireDate");
            }
        }
        private ushort _subSeq;
        /// <summary>
        ///  补助戳
        /// </summary>
        public ushort SubSeq
        {
            get { return _subSeq; }
            set
            {
                _subSeq = value;
                this.RaisePropertyChanged("SubSeq");
            }
        }


        private byte _isOpenInSys;
        /// <summary>
        ///  是否在本系统内开通
        /// </summary>
        public byte IsOpenInSys
        {
            get { return _isOpenInSys; }
            set
            {
                _isOpenInSys = value;
                this.RaisePropertyChanged("IsOpenInSys");
            }
        }
        private ushort _terminalNo;
        /// <summary>
        ///  终端号码
        /// </summary>
        public ushort TerminalNo
        {
            get { return _terminalNo; }
            set
            {
                _terminalNo = value;
                this.RaisePropertyChanged("TerminalNo");
            }
        }
        private string _flag;
        /// <summary>
        ///  状态
        /// </summary>
        public string Flag
        {
            get { return _flag; }
            set
            {
                _flag = value;
                this.RaisePropertyChanged("Flag");
            }
        }
        private byte _cardType;
        /// <summary>
        ///  卡类型
        /// </summary>
        public byte CardType
        {
            get { return _cardType; }
            set
            {
                _cardType = value;
                this.RaisePropertyChanged("CardType");
            }
        }
        private string _accType;
        /// <summary>
        ///  电子账户类型，如果输入则会查询相应的电子帐户余额
        /// </summary>
        public string AccType
        {
            get { return _accType; }
            set
            {
                _accType = value;
                this.RaisePropertyChanged("AccType");
            }
        }

        private ushort _usedCardNum;
        /// <summary>
        ///  卡片上的用卡次数
        /// </summary>
        public ushort UsedCardNum
        {
            get { return _usedCardNum; }
            set
            {
                _usedCardNum = value;
                this.RaisePropertyChanged("UsedCardNum");
            }
        }
        private int _accAmt;
        /// <summary>
        ///  精确查询时根据输入的AccType查询到的电子帐户余额
        /// </summary>
        public int AccAmt
        {
            get { return _accAmt; }
            set
            {
                _accAmt = value;
                this.RaisePropertyChanged("AccAmt");
            }
        }

        private short _retCode;
        /// <summary>
        /// 后台处理返回
        /// </summary>
        public short RetCode
        {
            get { return _retCode; }
            set
            {
                _retCode = value;
                this.RaisePropertyChanged("RetCode");
            }
        }
        private string _guiId;
        /// <summary>
        /// GuiId
        /// </summary>
        public string GuiId
        {
            get
            {
                return _guiId;
            }
            set
            {
                _guiId = value;
                this.RaisePropertyChanged("GuiId");
            }
        }
        private short cardRent;
        /// <summary>
        /// CardRent
        /// </summary>
        public short CardRent
        {
            get
            {
                return cardRent;
            }
            set
            {
                cardRent = value;
                this.RaisePropertyChanged("CardRent");
            }
        }
        /// <summary>
        /// 发卡版本号
        /// </summary>
        private ushort _cardVersion;
        /// <summary>
        /// CardVersion
        /// </summary>
        public ushort CardVersion
        {
            get
            {
                return _cardVersion;
            }
            set
            {
                _cardVersion = value;
                this.RaisePropertyChanged("CardVersion");
            }
        }
        
        /// <summary>
        /// 卡押金
        /// </summary>
        private short _depositAmt;
        /// <summary>
        /// DepositAmt
        /// </summary>
        public short DepositAmt
        {
            get
            {
                return _depositAmt;
            }
            set
            {
                _depositAmt = value;
                this.RaisePropertyChanged("DepositAmt");
            }
        }
        /// <summary>
        /// 租赁押金
        /// </summary>
        private short _rentDepositAmt;
        /// <summary>
        /// RentDepositAmt
        /// </summary>
        public short RentDepositAmt
        {
            get
            {
                return _rentDepositAmt;
            }
            set
            {
                _rentDepositAmt = value;
                this.RaisePropertyChanged("RentDepositAmt");
            }
        }
        /// <summary>
        /// 发卡日期
        /// </summary>
        private DateTime _openDate;
        /// <summary>
        /// OpenDate
        /// </summary>
        public DateTime OpenDate
        {
            get
            {
                return _openDate;
            }
            set
            {
                _openDate = value;
                this.RaisePropertyChanged("OpenDate");
            }
        }
        
        /// <summary>
        /// 换卡/补卡手续费、发卡柜子租金
        /// </summary>
        private short _feeAmt;
        /// <summary>
        /// FeeAmt
        /// </summary>
        public short FeeAmt
        {
            get
            {
                return _feeAmt;
            }
            set
            {
                _feeAmt = value;
                this.RaisePropertyChanged("FeeAmt");
            }
        }
        
        /// <summary>
        /// 现金标志,0-非现金 1-现金
        /// </summary>
        private int _cashFlag;
        /// <summary>
        /// CashFlag
        /// </summary>
        public int CashFlag
        {
            get
            {
                return _cashFlag;
            }
            set
            {
                _cashFlag = value;
                this.RaisePropertyChanged("CashFlag");
            }
        }


        #endregion
    
    }
    public class CardConsume : NotificationObject
    {
        private uint _accountNo;
        /// <summary>
        ///  AccountNo
        /// </summary>
        public uint AccountNo
        {
            get { return _accountNo; }
            set
            {
                _accountNo = value;
                this.RaisePropertyChanged("AccountNo");
            }
        }
        private uint _cardNo;
        /// <summary>
        ///  卡号
        /// </summary>
        public uint CardNo
        {
            get { return _cardNo; }
            set
            {
                _cardNo = value;
                this.RaisePropertyChanged("CardNo");
            }
        }
        private string _ConsumeType;
        /// <summary>
        ///  消费类型
        /// </summary>
        public string ConsumeType
        {
            get { return _ConsumeType; }
            set
            {
                _ConsumeType = value;
                this.RaisePropertyChanged("ConsumeType");
            }
        }
        private int _cardBalance;
        /// <summary>
        ///  卡余额,精确至分
        /// </summary>
        public int CardBalance
        {
            get { return _cardBalance; }
            set
            {
                _cardBalance = value;
                this.RaisePropertyChanged("CardBalance");
            }
        }
        private int _tranAmt;
        /// <summary>
        ///  交易额
        /// </summary>
        public int TranAmt
        {
            get { return _tranAmt; }
            set
            {
                _tranAmt = value;
                this.RaisePropertyChanged("TranAmt");
            }
        }
        private ushort _useCardNum;
        /// <summary>
        ///  用卡次数
        /// </summary>
        public ushort UseCardNum
        {
            get { return _useCardNum; }
            set
            {
                _useCardNum = value;
                this.RaisePropertyChanged("UseCardNum");
            }
        }
        private ushort _terminalNo;
        /// <summary>
        ///  终端编号
        /// </summary>
        public ushort TerminalNo
        {
            get { return _terminalNo; }
            set
            {
                _terminalNo = value;
                this.RaisePropertyChanged("TerminalNo");
            }
        }
        private string _passWord;
        /// <summary>
        ///  卡密码
        /// </summary>
        public string PassWord
        {
            get { return _passWord; }
            set
            {
                _passWord = value;
                this.RaisePropertyChanged("PassWord");
            }
        }
        private string _operator;
        /// <summary>
        ///  操作员
        /// </summary>
        public string Operator
        {
            get { return _operator; }
            set
            {
                _operator = value;
                this.RaisePropertyChanged("Operator");
            }
        }
        private string _abstract;
        /// <summary>
        ///  摘要
        /// </summary>
        public string Abstract
        {
            get { return _abstract; }
            set
            {
                _abstract = value;
                this.RaisePropertyChanged("Abstract");
            }
        }
        private uint _tranJnl;
        /// <summary>
        ///  交易流水号
        /// </summary>
        public uint TranJnl
        {
            get { return _tranJnl; }
            set
            {
                _tranJnl = value;
                this.RaisePropertyChanged("TranJnl");
            }
        }
        private uint _backJnl;
        /// <summary>
        ///  后台交易号
        /// </summary>
        public uint BackJnl
        {
            get { return _backJnl; }
            set
            {
                _backJnl = value;
                this.RaisePropertyChanged("BackJnl");
            }
        }
        private short _retCode;
        /// <summary>
        ///  后台返回值
        /// </summary>
        public short RetCode
        {
            get { return _retCode; }
            set
            {
                _retCode = value;
                this.RaisePropertyChanged("RetCode");
            }
        }
      
        }
      
   
    public class CardAction : NotificationObject
    {
        private uint _accountNo;
        /// <summary>
        ///  AccountNo
        /// </summary>
        public uint AccountNo
        {
            get { return _accountNo; }
            set
            {
                _accountNo = value;
                this.RaisePropertyChanged("AccountNo");
            }
        }
        private uint _cardNo;
        /// <summary>
        ///  卡号
        /// </summary>
        public uint CardNo
        {
            get { return _cardNo; }
            set
            {
                _cardNo = value;
                this.RaisePropertyChanged("CardNo");
            }
        }
        private string _sno;
        /// <summary>
        ///  学号
        /// </summary>
        public string Sno
        {
            get { return _sno; }
            set
            {
                _sno = value;
                this.RaisePropertyChanged("Sno");
            }
        }
        private string _queryPWD;
        /// <summary>
        ///  查询密码
        /// </summary>
        public string QueryPWD
        {
            get { return _queryPWD; }
            set
            {
                _queryPWD = value;
                this.RaisePropertyChanged("QueryPWD");
            }
        }
        private string _operator;
        /// <summary>
        ///  操作员
        /// </summary>
        public string Operator
        {
            get { return _operator; }
            set
            {
                _operator = value;
                this.RaisePropertyChanged("Operator");
            }
        }
        private short _retCode;
        /// <summary>
        ///  后台返回值
        /// </summary>
        public short RetCode
        {
            get { return _retCode; }
            set
            {
                _retCode = value;
                this.RaisePropertyChanged("RetCode");
            }
        }
    }

}